{{include "controllers/adminpanel/AdminMediaLibrary/index-path"}}
<div class="columns_wrapper">
	<div class="columns" style="width:{{MUL("242"):ADD(1):columns.length}}px">
		
		{{foreach c in columns}}
			<div class="column">
				
				<div class="column_header" data-id="{{c.id}}">{{c.name}}</div>
				<div class="list">
					<div class="folders">
						{{foreach f in c.folders}}
							<a href="{{action}}?file_folder_id={{f.id}}&&result_style=path" class="item{{if f.is_open}} itemA{{/if}}{{if c.last_one}} editable{{/if}}">
								{{if c.last_one}}<input type="checkbox" value="{{f.id}}"/>{{/if}}
								<div class="ico" style="background-image:url(/shared/icons/filebrowser/_folder-small.png);"></div> <span>{{f.name}}</span>
								<div class="cl"></div>
							</a>
						{{/foreach}}				
					</div>
					<div class="files">
						{{foreach f in c.files}}
							<div href="{{action}}?file_folder_id={{f.id}}&&result_style=path" class="item">
								<div id="file-{{f.id}}" class="{{if c.last_one}} editable{{/if}}"><div>
									{{if c.last_one}}<input type="checkbox" value="{{f.id}}"/>{{/if}}
									<div class="ico" style="background-image:url({{preview("0"):f.url}});"></div> <span>{{f.name}}</span>
									<div class="cl"></div>
								</div></div>
							</div>
						{{/foreach}}				
					</div>
					{{unless c.folders.length}}
					{{unless c.files.length}}
						<div class="item">- папка пуста - </div>
					{{/unless}}
					{{/unless}}
				</div>
			
			</div>
			
		{{/foreach}}
		<div class="column preview">
			
			<div class="column_header">Настройки файла</div>
			{{include "controllers/adminpanel/AdminMediaLibrary/index-rightpanel"}}
			</div>
		</div>
		
	</div>
</div>



<script>
AdminMediaLibraryFuncs.init_big_previews($('.columns .files .ico'));
$('.columns_wrapper').scrollLeft($('.columns_wrapper').width());
</script>